// @(#)thread.hh
// Time-stamp: <2008-11-20 11:01:44 root>
// Copyright 2008 Julian Qian
// Author: root@localhost.localdomain
// Version: $Id: thread.hh,v 0.0 2008/11/18 07:40:38 root Exp $
// Keywords: 
//

#ifndef _THREAD_H
#define _THREAD_H 1

#include <pthread.h>

typedef void* (*Functype)(void*);

class Thread {
public:
    Thread();
    virtual ~Thread();
    bool run(Functype func, void* param);
    void detach();
    void join();
private:
    pthread_t _pid;
    pthread_attr_t _attr;
    int _ret;
};

#endif /* _THREAD_H */

